package com.jiaozi.system.pojo.vo.sys.department;

import com.jiaozi.base.enums.sys.StateEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jiaozi.base.enums.sys.bean.TagEnumBean;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Schema(name = "部门树形结构")
@Data
public class DepartmentTreeVO {

    @Schema(description = "部门编码")
    private String id;

    @Schema(description = "上级编码")
    private String pId;
    //部门名称
    @Schema(description = "部门名称")
    private String departmentName;

    //状态
    @Schema(description = "状态")
    private StateEnum departmentState;
    @Schema(description = "是否启用展示数据")
    private TagEnumBean departmentStateTagEnumBean;

    public TagEnumBean getDepartmentStateTagEnumBean() {
        return departmentState.getTagBean();
    }

    //顺序0~99
    @Schema(description = "顺序")
    private Long departmentSort;

    @Schema(description = "下级部门")
    private List<DepartmentTreeVO> childDepartmentList;

}
